var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, n) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var n in e)
              Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
          })(e, n);
      };
      return function (e, n) {
        function o() {
          this.constructor = e;
        }
        if ("function" != typeof n && null !== n)
          throw new TypeError(
            "Class extends value " + String(n) + " is not a constructor or null"
          );
        t(e, n),
          (e.prototype =
            null === n
              ? Object.create(n)
              : ((o.prototype = n.prototype), new o()));
      };
    })(),
  AXAwardBeliefView = (function (t) {
    function e() {
      var e = t.call(this) || this;
      return (
        (e.onLoadAwardDataFn = {
          caller: e,
          code: 1113,
          method: function (t) {
            0 == t.code
              ? (ToastView.toastView(t.data),
                e.close(),
                WebSocketService.send({ c: 1009, d: { id: e.cid } }))
              : ToastView.toastView(t.msg);
          },
        }),
        e.btn_awardCancle.on(Laya.Event.CLICK, e, e.close),
        e.btn_awardSure.on(Laya.Event.CLICK, e, e.onAwardDidClickFn),
        WebSocketService.addListener(e.onLoadAwardDataFn),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showPropertyView = function (t, n) {
        null == this.awardView && (this.awardView = new e()),
          this.awardView.popup(!0),
          (this.awardView.cid = t),
          (this.awardView.herotype = n),
          (this.awardView.label_award_belief_title.text =
            "国士" == n
              ? "奖赏每消耗500银，增加1点忠诚度"
              : "奖赏每消耗100银，增加1点忠诚度");
      }),
      (e.prototype.onAwardDidClickFn = function () {
        WebSocketService.send({ c: 1113, d: { id: this.cid } });
      }),
      e
    );
  })(ui.SuboardinateController.AXAwardBeliefViewUI);
